<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>
<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("navigator") . ( substr("navigator",-1,1) != "/" ? "/" : "" ) . basename("navigator") );?>

<div id = "container">
	<h1 class = "header">จัดการข้อมูลผู้ใช้งานระบบ</h1>

	<div class = "tool">
		<a href = "admin-form.php"><img src="http://localhost/kpi/html/images/icon/add.png">เพิ่มผู้ใช้งาน</a>
	</div>
	<table cellpadding = "0" cellspacing = "0" border = "0" class = "list">
		<tr>
			<th class = 'w50'>ลำดับ</th>
			<th class = 'w100'>ชื่อผู้ใช้งาน</th>
			<th class = 'w150'>ชื่อ นามสกุล</th>
			<th class = 'w100'>ระดับ</th>
			<th class = 'w100'>เบอร์โทรศัพท์</th>
			<th class = 'w200'>อีเมล</th>
			<th class = 'w70'>เครื่องมือ</th>
		</tr>
		<?php $counter1=-1; if( isset($all_user) && is_array($all_user) && sizeof($all_user) ) foreach( $all_user as $key1 => $value1 ){ $counter1++; ?>
		<tr class = "alt<?php echo $key1%2;?>">
			<td><?php echo $key1+1;?></td>
			<td><?php echo $value1["username"];?></td>
			<td><?php echo $value1["name"];?></td>
			<td><?php echo $value1["level_name"];?></td>
			<td><?php echo $value1["tel"];?></td>
			<td><?php echo $value1["email"];?></td>
			<td>
				<a href = "admin-edit.php?id=<?php echo $value1["uid"];?>" alt = "แก้ไข" title = "แก้ไข"><img src="http://localhost/kpi/html/images/icon/edit.png"></a>
				<a href = "admin-delete.php?id=<?php echo $value1["uid"];?>" alt = "ลบ" title = "ลบ" class = "delete"><img src="http://localhost/kpi/html/images/icon/delete.png"></a>
			</td>
		</tr>
		<?php } ?>
	</table>
</div>

<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>